#include "LogEvent.h"
#include "Logger.h"

namespace bamboo {

LogEvent::LogEvent(Logger::ptr logger, LogLevel::Level level, const char* file, 
        int32_t line, uint32_t elapse, uint32_t thread_id, uint32_t fiber_id, 
        uint64_t time, const std::string& thread_name, const std::string& content) 
    : m_logger(logger)
    , m_level(level)
    , m_file(file)
    , m_line(line)
    , m_elapse(elapse)
    , m_threadId(thread_id)
    , m_fiberId(fiber_id)
    , m_time(time)
    , m_threadName(thread_name)
    , m_content(content)
    {}
    
LogEventWrap::LogEventWrap(LogEvent::ptr e)
    :m_event(e) {
}

LogEventWrap::~LogEventWrap() {
    m_event->getLogger()->log(m_event);
}



} // namespace bamboo

